package pers.lonestar.framework.utils.support.converters;

import pers.lonestar.framework.utils.support.enums.CellDataTypeEnum;
import pers.lonestar.framework.utils.support.metadata.CellData;

public class StringConverter implements Converter<String> {
    @Override
    public String convertToJavaObject(CellData<String> cellData) {
        return cellData.getStringValue();
    }

    @Override
    public CellData<String> convertToCellData(String data) {
        CellData<String> cellData = new CellData<>();
        cellData.setStringValue(data);
        cellData.setType(CellDataTypeEnum.STRING);
        cellData.setData(data);
        return cellData;
    }
}
